using AppToolKit.Model.Validation.Validator;
using System;
namespace AppToolKit.Model.Validation.Attribute
{
	public class StrLengthRuleAttribute : RuleAttribute
	{
		private int len_;
		public int Length
		{
			get
			{
				return this.len_;
			}
		}
		public StrLengthRuleAttribute(int len, ValidateBehavior behavior) : base(behavior)
		{
			this.len_ = len;
		}
		public StrLengthRuleAttribute(int len) : this(len, ValidateBehavior.Both)
		{
		}
		public override IValidator CreateVaildator()
		{
			return new StringLenRuleValidator(this.len_);
		}
	}
}
